# Contributor: Shannon Noe <snoe925@gmail.com>
# Maintainer: rubicon <rubicon@mailo.com>
pkgname=tclx
pkgver=8.6.2
pkgrel=0
pkgdesc="TclX extension to Tcl"
url="https://github.com/flightaware/tclx"
arch="all"
license="BSD"
depends="tcl"
depends_dev="tcl-dev"
makedepends="$depends_dev"
checkdepends="bash"
subpackages="$pkgname-doc $pkgname-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/flightaware/tclx/archive/v$pkgver.tar.gz
	process-test.patch
	"

build() {
	local _64bit="--disable-64bit"
	case "$CARCH" in
	x86_64) _64bit="--enable-64bit";;
	esac
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--enable-threads \
		$_64bit
	make
}

check() {
	make test TESTFLAGS="-verbose pbtels"
}

package() {
	make -j1 DESTDIR="$pkgdir" install
}

sha512sums="
299ae04c00edd268f41da5e0e2f8baca2965e3cad1d7ece86bd84e55d83f5e9574b260c22fd891d5284700b751f73f3b6b30d9e31b53f435fd4cfe5d5c7cf0eb  tclx-8.6.2.tar.gz
54044611c72f0355bd906f78327605b9f350e265a185478d2e77a32a2b00ef532da8395f7571b470fc9e066ec424b18d295b1b5245e3da64dac0cf57b57f1fd1  process-test.patch
"
